3.205 \(\int \frac{c+d x^2}{x^2 (a+b x^2)} \, dx\)

Optimal. Leaf size=43 \[ -\frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{c}{a x} \]

[Out]

-(c/(a*x)) - ((b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(a^(3/2)*Sqrt[b])

________________________________________________________________________________________

Rubi [A]  time = 0.0203093, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {453, 205} \[ -\frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{c}{a x} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2)/(x^2*(a + b*x^2)),x]

[Out]

-(c/(a*x)) - ((b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(a^(3/2)*Sqrt[b])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{c+d x^2}{x^2 \left (a+b x^2\right )} \, dx &=-\frac{c}{a x}-\frac{(b c-a d) \int \frac{1}{a+b x^2} \, dx}{a}\\ &=-\frac{c}{a x}-\frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.0253388, size = 42, normalized size = 0.98 \[ \frac{(a d-b c) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{c}{a x} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2)/(x^2*(a + b*x^2)),x]

[Out]

-(c/(a*x)) + ((-(b*c) + a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(a^(3/2)*Sqrt[b])

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 48, normalized size = 1.1 \begin{align*} -{\frac{c}{ax}}+{d\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{bc}{a}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^2+c)/x^2/(b*x^2+a),x)

[Out]

-c/a/x+1/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*d-c*b/a/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)/x^2/(b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.50154, size = 230, normalized size = 5.35 \begin{align*} \left [\frac{\sqrt{-a b}{\left (b c - a d\right )} x \log \left (\frac{b x^{2} - 2 \, \sqrt{-a b} x - a}{b x^{2} + a}\right ) - 2 \, a b c}{2 \, a^{2} b x}, -\frac{\sqrt{a b}{\left (b c - a d\right )} x \arctan \left (\frac{\sqrt{a b} x}{a}\right ) + a b c}{a^{2} b x}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)/x^2/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(sqrt(-a*b)*(b*c - a*d)*x*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) - 2*a*b*c)/(a^2*b*x), -(sqrt(a*b)
*(b*c - a*d)*x*arctan(sqrt(a*b)*x/a) + a*b*c)/(a^2*b*x)]

________________________________________________________________________________________

Sympy [B]  time = 0.459156, size = 82, normalized size = 1.91 \begin{align*} - \frac{\sqrt{- \frac{1}{a^{3} b}} \left (a d - b c\right ) \log{\left (- a^{2} \sqrt{- \frac{1}{a^{3} b}} + x \right )}}{2} + \frac{\sqrt{- \frac{1}{a^{3} b}} \left (a d - b c\right ) \log{\left (a^{2} \sqrt{- \frac{1}{a^{3} b}} + x \right )}}{2} - \frac{c}{a x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x**2+c)/x**2/(b*x**2+a),x)

[Out]

-sqrt(-1/(a**3*b))*(a*d - b*c)*log(-a**2*sqrt(-1/(a**3*b)) + x)/2 + sqrt(-1/(a**3*b))*(a*d - b*c)*log(a**2*sqr
t(-1/(a**3*b)) + x)/2 - c/(a*x)

________________________________________________________________________________________

Giac [A]  time = 1.15237, size = 50, normalized size = 1.16 \begin{align*} -\frac{{\left (b c - a d\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} a} - \frac{c}{a x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)/x^2/(b*x^2+a),x, algorithm="giac")

[Out]

-(b*c - a*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a) - c/(a*x)